package com.heaven.back.mapper;

import com.heaven.back.pojo.Item;
import com.heaven.back.pojo.Player;
import org.apache.ibatis.annotations.Mapper;

import java.util.ArrayList;
import java.util.List;

/**
 * The interface Action mapper.
 */
@Mapper
public interface ActionMapper {

    /**
     * Gets by username and password.
     *
     * @param p the p
     * @return the by username and password
     */
    Player getByUsernameAndPassword(Player p);

    /**
     * Add.
     *
     * @param p the p
     */
    void add(Player p);

    /**
     * Update.
     *
     * @param player the player
     */
    void update(Player player);

    /**
     * Search byid player.
     *
     * @param id the id
     * @return the player
     */
    Player searchByid(Integer id);

    /**
     * Search room string.
     *
     * @param room the room
     * @return the string
     */
    String searchRoom(String room);

    /**
     * Serch effect string.
     *
     * @param eatEffect the eat effect
     * @return the string
     */
    String serchEffect(int eatEffect);

    /**
     * Item list.
     *
     * @return the list
     */
    List<Item> item();

    /**
     * Search byroom array list.
     *
     * @param roomName the room name
     * @return the array list
     */
    ArrayList<String> searchByroom(String roomName);
}
